import React, { Component } from 'react';
import {
  View,
  Text,
  Platform,
  StyleSheet,
  Image,
} from 'react-native';

import PxToDp from '../../utils/PxToDp';
import NavCon from '../Public/NavCon';
import Base from '../../utils/Base';

export default class Feedback extends Component {
  render() {
    return (
      <View style={style.flex}>
        <View style={style.header}>
          <NavCon backName="返回" currentTitle="关于我们" onPress={() => this.props.navigator.pop()} />
        </View>
        <View style={[style.flex, style.border_Top]}>
          <Image style={style.logoimg} source={require('../../img/logobj.png')} />
          <Text style={style.text}>车势科技专注于为汽车行业提供沉浸式一体化的智能销售解决方案</Text>
          <Text style={style.edition}>{Base.version}版本</Text>
          <View style={[style.row, style.content, style.contentTop]}>
            <Text>邮箱：info@autoforce.net</Text>
          </View>
          <View style={[style.row, style.content]}>
            <Text>电话：010-65066808</Text>
          </View>
        </View>
      </View>
    );
  }
}

const style = StyleSheet.create({
  flex: {
    flex: 1,
    marginTop: Platform.OS === 'ios' ? 20 : 0,
  },
  row: {
    flexDirection: 'row',
  },
  header: {
    height: PxToDp(46),
  },
  border_Top: {
    borderTopWidth: 1,
    borderStyle: 'solid',
    borderColor: '#E5E5E5',
    backgroundColor: '#f5f5f5',
    alignItems: 'center',
  },
  logoimg: {
    width: PxToDp(77),
    height: PxToDp(77),
    marginTop: PxToDp(50),
  },
  text: {
    color: '#191D22',
    marginTop: PxToDp(36),
    paddingLeft: PxToDp(68),
    paddingRight: PxToDp(68),
    textAlign: 'center',
    lineHeight: 20,
  },
  edition: {
    marginTop: PxToDp(36),
    textAlign: 'center',
    color: '#BBBEC7',
  },
  content: {
    height: PxToDp(44),
    alignItems: 'center',
    paddingLeft: PxToDp(22),
    backgroundColor: '#fff',
    width: '100%',
    borderTopWidth: PxToDp(1),
    borderStyle: 'solid',
    borderColor: '#F3F4F6',
  },
  contentTop: {
    marginTop: PxToDp(41),
  },
});
